# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     lib
   Description :
   Author :       Flyoung
   date：          2023/2/22
-------------------------------------------------
   Change Activity:
                   2023/2/22:
-------------------------------------------------
"""
import string

# 小数点
point = '.'
# 下划线
underline = '_'
# 数字表
digit = string.digits + point
# 字母表
alpha = string.ascii_letters + underline
# 空白字符
blank = "\r\n\t "
# 注释
notes = "//"
# 符号表
signs = {
    "=": 27, "<=": 28, "<>": 29, "<": 30, ">=": 31, ">": 32, "+": 33, "-": 34,
    "*": 35, "==": 53, "/": 36, "//": 37, ":": 38, ";": 39, "(": 40, ")": 41,
    "{": 42, "}": 43, "[": 44, "]": 45, "\"": 46, ",": 47, "'": 48, "!=": 49,
    "&": 50, "&&": 51, "||": 52, "|": 54, "%": 55, "?": 56, "++": 57, "--": 58,
    "<<": 59, ">>": 60
}
# 类型保留字
var_type_reserved_words = [
    "char", "int", "float", "double", "short", "string", "long"
]
# 循环保留字
circular_reserved_words = [
    "while", "for",
]
# io 保留字
io_reserved_words = [
    "cout", "cin"
]
# 分支保留字
branch_reserved_words = [
    "if", "else", "break",
]
# 保留字数组
reserved_words = var_type_reserved_words + circular_reserved_words + io_reserved_words + branch_reserved_words + [
    "do",
    "return",
    "define",
    "include",
]
# 左括号
left_brackets = [
    '(',
    # '<',
    '{',
    '['
]
# 右括号
right_brackets = [
    ')',
    # '>',
    '}',
    ']'
]
# 右括号与左括号匹配关系
bracket_match = {
    ')': '(',
    # '>': '<',
    ']': '[',
    '}': '{',
}
# 括号
brackets = left_brackets + right_brackets
